package com.fick.hibernate.dao;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;

import com.fick.hibernate.model.*;

/**
 * A data access object (DAO) providing persistence and search support for Link
 * entities. Transaction control of the save(), update() and delete() operations
 * can directly support Spring container-managed transactions or they can be
 * augmented to handle user-managed Spring transactions. Each of these methods
 * provides additional information for how to configure it for the desired type
 * of transaction control.
 * 
 * @see com.fick.hibernate.model.Link
 * @author MyEclipse Persistence Tools
 */

public class IpAllowedStateDAO extends BaseHibernateDAO {
	private static final Log log = LogFactory.getLog(IpAllowedStateDAO.class);

	// property constants

	public List findAll() {
		log.debug("finding all IpAllowedState instances");
		try {
			String queryString = "from IpAllowedState";
			Query queryObject = getSession().createQuery(queryString);
			return queryObject.list();
		} catch (RuntimeException re) {
			log.error("find all failed", re);
			throw re;
		}
	}
}